package controller

import (
	"gin-shop-admin/repository"
	"github.com/gin-gonic/gin"
	"net/http"
)

func GetUsers(c *gin.Context) {
	userList, err := repository.GetAllUsers()
	if err != nil {
		c.JSON(http.StatusCreated, gin.H{"error": err.Error()})
	} else {
		c.JSON(http.StatusOK, userList)
	}
}
